package com.horay.springclouddemo.stream.multiple.provider.controller;

import com.horay.springclouddemo.stream.multiple.provider.service.MessageChannelService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Class description
 *
 * @author heyingcheng
 * @date 2020/3/28 20:09
 */
@RestController
@RequestMapping("message/provider")
public class MessageProviderController {

    private final MessageChannelService messageChannelService;

    public MessageProviderController(MessageChannelService messageChannelService) {
        this.messageChannelService = messageChannelService;
    }

    @GetMapping
    public String send() {
        return messageChannelService.send();
    }

}
